import request from "../utils/request"
import {Response} from "@/Interface/base"
import { LoginPost } from "../Interface/login"

/**
 * 测试环境接口调用示例。
**/
// Get
export const GETEnvApi = (): Response<string> =>{
	return request({url:'/api/test',method:'get'})
}

// Get Params 参数化请求示例。
export const GETParamsEnvApi = (params: { id: number }): Response<string> =>{
	return request({url:`/api/test/${params.id}`,method:'get',params})
}



// Post
export const POSTEnvApi = (data:LoginPost): Response<object> =>{
	return request({url:'/api/test',method:'post',data})
}

// Post 参数化请求示例。
export const POSTParamsEnvApi = (data:LoginPost): Response<object> =>{
	return request({url:`/api/test/${data.UserName}`,method:'post',data})
}